﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Syngine
{
	/// <summary>
	/// 
	/// </summary>
	public struct LoadContext
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="gameController"></param>
		/// <param name="content"></param>
		public LoadContext(GameController gameController, ContentManager content) : this()
		{
			Content = content;
			GameController = gameController;
			Game = gameController.Game;
			GraphicsDevice = gameController.GraphicsDevice;
		}

		/// <summary>
		/// 
		/// </summary>
		public Game Game { get; private set; }

		/// <summary>
		/// 
		/// </summary>
		public GameController GameController { get; private set; }

		/// <summary>
		/// 
		/// </summary>
		public ContentManager Content { get; private set; }

		/// <summary>
		/// 
		/// </summary>
		public GraphicsDevice GraphicsDevice { get; private set; }

		/// <summary>
		/// 
		/// </summary>
		/// <param name="assetName"></param>
		/// <typeparam name="T"></typeparam>
		/// <returns></returns>
		public T Load<T>(string assetName)
		{
			return Content.Load<T>(assetName);
		}
	}
}